if(typeof gxc == "undefined"){
	var gxc = {};
}

gxc.form = {};

gxc.form.getParams = function(form_id) {

	if (!jQuery(form_id).length) {
		return false;
	}
	var data = {};
	var name = null;
	var value = null;
	var array = null;
	jQuery(form_id).find("input[type!='checkbox'][type!='radio'], input:checked ,textarea,select").each(function(){
		name = null;
		name = jQuery(this).attr("name");
		value = null;
		value = jQuery(this).val();
		if(name){
			if(data[name] == undefined){
				data[name] = value;
			}
			else {
				if(data[name] instanceof Array){
					data[name].push(value);
				}else {
					array = null;
					array = new Array();
					array.push(data[name]);
					array.push(value);
					data[name] = array;
				}
			}
		}
	})
	return data;
}